:root {
    --primary-color: #07c160;
    --primary-hover: rgba(62, 57, 57, 0.23);
    --border-color: #e6e6e6;
    --border-radius: 8px;
    --text-color: #333;
    --light-bg: #f9fafb;
    --chat-bg: #f0f0f0;
    --user-bg: #95ec69a3;
    --toolbar-height: 50px;
}

* {
    box-sizing: border-box;
    margin: 0;
    /* padding: 0; */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4ecfb 100%);
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;

}

.container {
    width: 100%;
    height: 60%;
    max-width: 800px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 5px;
}

header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.chat-container {
    padding: 20px;
    background: white;
    min-height: 100%;
    max-height: 100%;
    overflow-y: auto;
}

.message {
    display: flex;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message.bot .message-content {
    background: #d8d8d8;
    border-top-left-radius: 5px;
}

.message.user .message-content {
    background: var(--user-bg);
    border-top-right-radius: 5px;
}

.input-container {
    height: 34%;
    padding: 11px;
    background: white;
    border-top: 1px solid var(--border-color);
}

.toolbar {
    display: flex;
    padding: 0px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    min-height: var(--toolbar-height);
}

.toolbar-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-right: 10px;
    color: #666;
    transition: all 0.2s;
    font-size: 20px;
    flex-shrink: 0;
}

.toolbar-button:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.file-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 10px;
    max-width: calc(100% - 150px);
    overflow-x: auto;
    padding: 2px;
}

.file-preview-item {
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: white;
    cursor: pointer;
}

.file-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-item .file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 16px;
    color: #666;
}

.file-preview-item .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff4d4f;
    color: white;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    z-index: 10;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
    padding: 0;
    line-height: 1;
    transition: all 0.2s;
}

.file-preview-item .remove-btn:hover {
    background: #ff7875;
    transform: scale(1.1);
}

.input-area {
    position: relative;
    margin-top: 10px;
}

.input-box {
    width: 100%;
    min-height: 151px;
    max-height: 151px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    font-size: 16px;
    resize: none;
    outline: none;
    transition: border-color 0.3s;
    overflow-y: auto; /* æ·»åŠ åž‚ç›´æ»šåŠ¨æ¡ */
    line-height: 1.5;
}

.input-box:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.1);
}

.input-box.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(7, 193, 96, 0.05);
}

.placeholder_ {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #aaa;
    pointer-events: none;
    user-select: none;
}

.input-box:focus + .placeholder_,
.input-box:not(:empty) + .placeholder_ {
    display: none;
}

.input-buttons {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

button:hover {
    background: var(--primary-hover);
}

button.secondary {
    background: white;
    color: #666;
    border: 1px solid var(--border-color);
}

button.secondary:hover {
    background: var(--light-bg);
}

.enter-hint {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    text-align: right;
}

.usage-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-top: 30px;
    width: 100%;
    max-width: 800px;
}

.section-title {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
}

.feature-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-color);
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

.hidden {
    display: none;
}

@media (max-width: 600px) {
    .message-content {
        max-width: 85%;
    }

    .file-previews {
        max-width: calc(100% - 120px);
    }
}

/*视频的预览*/
.video-preview {
    max-width: 300px;
    max-height: 200px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/*图像预览*/
.image-preview {
    max-width: 300px;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.file-modal-body {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 原图显示样式 */
.file-modal-body img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}